<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="srcPath" value="${redis:getSysConfig('sysFileVisitRoot_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看店铺详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/enterShopInfo/getShopInfoObject.sjson",
            data: {shopInfoId:id},
            success: function(result){
                var isPass;
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                var shop = data.shopInfo;
                $("#d_categoryName").html(data.categoryName);
                $("#d_customerName").html(shop.customerName);
                $("#d_shopName").html(shop.shopName);
                $("#d_address").html(shop.address);
                $("#d_postCode").html(shop.postCode);
                $("#d_mainProduct").html(shop.mainProduct);
                $("#d_phone").html(shop.phone);
                $("#d_marketBrandUrlPreview").html("<img id='uploadImg_detail_1' class='uploadImg' onMouseOver='showDetailBigImage(1,3,3,0)'  onMouseOut='showDetailRebackImage(1,1,1)' src='${uploadPath}/"+shop.marketBrandUrl+"' onerror='this.src=\"${srcPath}/common/images/mrbj.png\"' width='50px' height='50px' />");
                $("#d_businessLicensePreview").html("<img id='uploadImg_detail_2' class='uploadImg' onMouseOver='showDetailBigImage(2,3,3,0)'  onMouseOut='showDetailRebackImage(2,1,1)' src='${uploadPath}/"+shop.businessLicense+"' onerror='this.src=\"${srcPath}/common/images/mrbj.png\"' width='50px' height='50px' />");
                var num = shop.isPass;
                if(num == 3){
                    isPass = "<font class='color_001'>是</font>";
                }
                if(num==2){
                    isPass = "<font class='color_002'>否</font>";
                }
                if(num==1){
                    isPass = "<font class='color_003'>未审核</font>";
                }
                $("#d_isPass").html(isPass);
            }
        });
    }

</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">店铺详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">店铺分类:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_categoryName"></span></td>
						<td class="toright_td" width="150px">店铺名称:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_shopName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">会员名称:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_customerName"></span></td>
						<td class="toright_td" width="150px">联系电话:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_phone"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">详细地址(街道):</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_address"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">邮政编码:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_postCode"></span></td>
						<td class="toright_td" width="150px">主要销售产品:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_mainProduct"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">销售品牌Logo:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_marketBrandUrlPreview"></span></td>
						<td class="toright_td" width="150px">营业执照（三证合一）:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_businessLicensePreview"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">是否通过:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_isPass"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>

